$OpenBSD: patch-build_config_BUILDCONFIG_gn,v 1.2 2017/04/19 05:16:46 robert Exp $
--- build/config/BUILDCONFIG.gn.orig.port	Thu Mar  9 21:04:27 2017
+++ build/config/BUILDCONFIG.gn	Fri Mar 10 07:46:16 2017
@@ -131,12 +131,13 @@ declare_args() {
   is_official_build = false
 
   # Whether we're a traditional desktop unix.
-  is_desktop_linux = current_os == "linux"
+  is_desktop_linux = current_os == "linux" || current_os == "openbsd"
 
   # Set to true when compiling with the Clang compiler. Typically this is used
   # to configure warnings.
   is_clang = current_os == "mac" || current_os == "ios" ||
-             current_os == "linux" || current_os == "chromeos"
+             current_os == "linux" || current_os == "chromeos" ||
+             current_os == "openbsd"
 
   # Allows the path to a custom target toolchain to be injected as a single
   # argument, and set as the default toolchain.
@@ -197,6 +198,8 @@ if (host_toolchain == "") {
     } else {
       host_toolchain = "//build/toolchain/linux:$host_cpu"
     }
+  } else if (host_os == "openbsd") {
+    host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
   } else if (host_os == "mac") {
     host_toolchain = "//build/toolchain/mac:clang_$host_cpu"
   } else if (host_os == "win") {
@@ -231,6 +234,8 @@ if (target_os == "android") {
   }
 } else if (target_os == "ios") {
   _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu"
+} else if (target_os == "openbsd") {
+  _default_toolchain = host_toolchain
 } else if (target_os == "mac") {
   assert(host_os == "mac", "Mac cross-compiles are unsupported.")
   _default_toolchain = host_toolchain
@@ -284,6 +289,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = false
   is_posix = false
+  is_openbsd = false
   is_win = true
 } else if (current_os == "mac") {
   is_android = false
@@ -293,6 +299,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = true
   is_nacl = false
   is_posix = true
+  is_openbsd = false
   is_win = false
 } else if (current_os == "android") {
   is_android = true
@@ -302,6 +309,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = false
   is_posix = true
+  is_openbsd = false
   is_win = false
 } else if (current_os == "chromeos") {
   is_android = false
@@ -311,6 +319,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = false
   is_posix = true
+  is_openbsd = false
   is_win = false
 } else if (current_os == "nacl") {
   # current_os == "nacl" will be passed by the nacl toolchain definition.
@@ -323,6 +332,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = true
   is_posix = true
+  is_openbsd = false
   is_win = false
 } else if (current_os == "ios") {
   is_android = false
@@ -332,6 +342,7 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = false
   is_posix = true
+  is_openbsd = false
   is_win = false
 } else if (current_os == "linux") {
   is_android = false
@@ -341,7 +352,18 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_mac = false
   is_nacl = false
   is_posix = true
+  is_openbsd = false
   is_win = false
+} else if (current_os == "openbsd") {
+  is_android = false
+  is_chromeos = false
+  is_ios = false
+  is_linux = true
+  is_mac = false
+  is_nacl = false
+  is_posix = true
+  is_win = false
+  is_openbsd = true
 }
 
 # =============================================================================
